<#import "/analysis/function.ftl" as fn>
<@fn.header _title="外网人员工作超时统计">
<@fn.getStreet />
</@fn.header>
<body>
<@fn.position _value="当前位置 &gt;&gt; 工作量与绩效统计 &gt; 外网人员工作超时统计" />
<div class="contentDiv">
  <div class="condition">
    <h2>统计条件</h2>
    <form id="listForm" method="post">
	    <table class="tableStyle">
	      <tr>
	        <td width="15%">操作时间段：</td>
	        <td width="22%"><input name="acceptStartTime" type="text" class="btnTxtDate" id="textfield" onClick="WdatePicker()" />
	          至
	          <input name="acceptEndTime" type="text" class="btnTxtDate" id="textfield13" onClick="WdatePicker()" />
	          </td>
	        <td width="8%">所属区县：</td>
	        <td width="22%"><select name="countiesRegionId" class="btnSelect" id="country" onchange="getStreet(this.value)">
	            <option value="">-- 请选择 --</option>
				<#if countryRegionList??>
					<#list countryRegionList as region>
					  <option value="${region.id}">${region.name}</option>
					</#list>
				</#if>
	          </select>
	          </td>
	        <td width="11%">所属街道：</td>
	        <td width="22%"><select name="streetRegionId" class="btnSelect" id="street">
	            <option value="">-- 请选择 --</option>
	          </select></td>
	      </tr>
	    </table>
	    <table class="buttonT">
	      <tr>
	        <td width="10%"><input type="submit" class="button" value="统 计" /></td>
	      </tr>
	    </table>
	</form>
  </div>
  <div class="reasult">
    <h2>统计结果</h2>
    <table class="gridStyle">
      <tr>
        <th rowspan="2">区县</th>
        <th rowspan="2">街道</th>
        <th colspan="2">信息录入</th>
        <th colspan="2">信息核实</th>
        <th rowspan="2">超时总数</th>
      </tr>
      <tr>
      	<td>超时份数</td>
      	<td>最长超期天数</td>
      	<td>超时份数</td>
      	<td>最长超期天数</td>
      </tr>
        <#assign timeOverNumOfInputTotal=0 />
        <#assign timeOverMaxDaysOfInputTotal=0 />
        <#assign timeOverNumOfCheckTotal=0 />
        <#assign timeOverMaxDaysOfCheckTotal=0 />
        <#assign timeOverSumTotal=0 />
      <#list resultList as data>
        <#assign timeOverNumOfInputTotal=timeOverNumOfInputTotal+ data.streetTimeoverDataList[0].timeOverNumOfInput />
        <#assign timeOverMaxDaysOfInputTotal=timeOverMaxDaysOfInputTotal+ data.streetTimeoverDataList[0].timeOverMaxDaysOfInput />
        <#assign timeOverNumOfCheckTotal=timeOverNumOfCheckTotal+ data.streetTimeoverDataList[0].timeOverNumOfCheck />
        <#assign timeOverMaxDaysOfCheckTotal=timeOverMaxDaysOfCheckTotal+ data.streetTimeoverDataList[0].timeOverMaxDaysOfCheck />
        <#assign timeOverSumTotal=timeOverSumTotal+ data.streetTimeoverDataList[0].timeOverSum />
      <tr>
        <td<#if (data.streetTimeoverDataList?size>1)> rowspan="${data.streetTimeoverDataList?size}"</#if>>${data.countryRegionName}</td>
        <td>${data.streetTimeoverDataList[0].streetRegionName}</td>
        <td>${data.streetTimeoverDataList[0].timeOverNumOfInput}</td>
        <td>${data.streetTimeoverDataList[0].timeOverMaxDaysOfInput}</td>
        <td>${data.streetTimeoverDataList[0].timeOverNumOfCheck}</td>
        <td>${data.streetTimeoverDataList[0].timeOverMaxDaysOfCheck}</td>
        <td>${data.streetTimeoverDataList[0].timeOverSum}</td>
      </tr>
	      <#if (data.streetTimeoverDataList?size>1)>
		      <#list data.streetTimeoverDataList[1..] as _data>
		        <#assign timeOverNumOfInputTotal=timeOverNumOfInputTotal+ _data.timeOverNumOfInput />
		        <#assign timeOverMaxDaysOfInputTotal=timeOverMaxDaysOfInputTotal+ _data.timeOverMaxDaysOfInput />
		        <#assign timeOverNumOfCheckTotal=timeOverNumOfCheckTotal+ _data.timeOverNumOfCheck />
		        <#assign timeOverMaxDaysOfCheckTotal=timeOverMaxDaysOfCheckTotal+ _data.timeOverMaxDaysOfCheck />
		        <#assign timeOverSumTotal=timeOverSumTotal+ _data.timeOverSum />
			      <tr>
			        <td>${_data.streetRegionName}</td>
			        <td>${_data.timeOverNumOfInput}</td>
			        <td>${_data.timeOverMaxDaysOfInput}</td>
			        <td>${_data.timeOverNumOfCheck}</td>
			        <td>${_data.timeOverMaxDaysOfCheck}</td>
			        <td>${_data.timeOverSum}</td>
			      </tr>
		      </#list>
	      </#if>
	  </#list>
      <tr>
        <td colspan="2">合计</td>
        <td>${timeOverNumOfInputTotal}</td>
        <td>${timeOverMaxDaysOfInputTotal}</td>
        <td>${timeOverNumOfCheckTotal}</td>
        <td>${timeOverMaxDaysOfCheckTotal}</td>
        <td>${timeOverSumTotal}</td>
      </tr>
    </table>
  </div>
  <div class="explain">
    <h3>说明：</h3>
    <p>1. 总数=“基本信息核实”数+ “信息录入”数.</p>
  </div>
</div>
</body>
</html>
